<%--
  Created by IntelliJ IDEA.
  User: Albert Lee
  Date: 2020/5/15
  Time: 20:14
  To change this template use File | Settings | File Templates.
--%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<body>
<h2>购物车商品：</h2>

<%
    Map<String,Integer>map=(Map<String,Integer>)session.getAttribute("kind");
    if(map!=null) {
        for(String key:map.keySet()) {
            int val=map.get(key);
            System.out.print(val);
            %>
            <h3>名称:<%=key%>  数量：<%=val%></h3>
            <%
        }
    }
%>

<a href="clearServlet">清空购物车</a>
</body>
</html>